import axios from "axios";

// axios.defaults.baseURL = 'http://127.0.0.1:8002'

// 获取商品
export const findGoods = () => axios.get('/goods/findGoods')

// 商品图片上传
export const fileUpload = (data) => axios.post('/goods/fileUpload', data)

// 添加一个商品信息
export const addGoods = (data) => axios.post("/goods/addGoods", data);

// 删除上传文件
export const deleteFiles = (data) => axios.post('/goods/deleteFiles', data)

// 根据编号查询商品
export const findGoodsById = (data) => axios.post('/goods/findGoodsById', data)

// 删除商品
export const deleteGoods = (data) => axios.post('/goods/deleteGoods', data)

// 修改商品信息
export const updateGoods = (data) => axios.post('/goods/updateGoods', data)

// 搜索
export const findGoodsByName = (data) => axios.post('/goods/findGoodsByName', data)